import jsonp from '../common/js/jsonp'
import axios from 'axios'
import {commonParams, options, HOST} from './config'

export function getRecommend () {
    const url = 'https://c.y.qq.com/musichall/fcgi-bin/fcg_yqqhomepagerecommend.fcg'
    const data = Object.assign({},commonParams,{
        platform: 'h5',
        uin: 0,
        needNewCode: 1
    })

    return jsonp(url, data, options)
}

export function getBnaner () {
  const url = `${HOST}/banner?type=2`
  return axios.get(url,{withCredentials: true})
}

export function getAuth () {
  const url = `${HOST}/login?email=18022431623@163.com&password=ljx5201314`
  return axios.get(url,{withCredentials: true})
}

export function getDiscList () {
  const url = `${HOST}/recommend/resource`
  return axios.get(url,{withCredentials: true})
}

export function getDiscSong () {
  const url = `${HOST}/recommend/songs`
  return axios.get(url,{withCredentials: true})
}

export function getPlayListHot () {
  const url = `${HOST}/playlist/hot`
  return axios.get(url,{withCredentials: true})
}
